package com.guli.eduService.controller;

import com.guli.commonUtils.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

/**
 * @author zxc
 * @date 2023/03/31 09:09
 **/
@Api(description = "模拟登录模块")
@RestController
@RequestMapping("/eduService/user")
//@CrossOrigin // 解决跨域问题
public class EduLoginController {
    // 登录功能
    @PostMapping("/login")
    public R login(){
        return R.ok().data("token" , "zxc");
    }
    // 获取用户信息
    @GetMapping("/info")
    public R info(){
        return R.ok().data("roles" , "[zxc]").data("name","zxc").data("avatar","https://gimg2.baidu.com/" +
                "image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2Ff1811a32-cc4b-4668-9467-66543e49c59d" +
                "%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002" +
                "&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1682817582&t=218146db16f2aefaf759f58fcb7bdf09");
    }
}
